using System;
using System.Data;
using System.Collections;

namespace APP.QUANLY.Entity
{
     /// <summary>
     /// Summary description for KHOMATHANG.
     /// </summary>
     public class KHOMATHANG
    {
              private Guid _MAKHO;
      private Int32 _MAMATHANG;
      private decimal _SOLUONGSI;
      private decimal _SOLUONGLE;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
		      public bool IsMAKHONullable
      { get { return false;  } }
      public Guid MAKHO
      {
         get { return _MAKHO; }
         set { _MAKHO = value; }
      }
      public bool IsMAMATHANGNullable
      { get { return false;  } }
      public Int32 MAMATHANG
      {
         get { return _MAMATHANG; }
         set { _MAMATHANG = value; }
      }
      public bool IsSOLUONGSINullable
      { get { return true;  } }
      public decimal SOLUONGSI
      {
         get { return _SOLUONGSI;  }
         set { _SOLUONGSI = value; }
      }
      public bool IsSOLUONGLENullable
      { get { return true;  } }
      public decimal SOLUONGLE
      {
         get { return _SOLUONGLE;  }
         set { _SOLUONGLE = value; }
      }

        #endregion

        #region Constructors
        public KHOMATHANG()
        {
            Reset();
        }
        public KHOMATHANG(KHOMATHANG obj)
        {
            	this._MAKHO = obj.MAKHO;
	this._MAMATHANG = obj.MAMATHANG;
	this._SOLUONGSI = obj.SOLUONGSI;
	this._SOLUONGLE = obj.SOLUONGLE;
        }
        #endregion

        public void Reset()
        {
                     _MAKHO = EmptyValues.v_Guid;
         _MAMATHANG = EmptyValues.v_Int32;
         _SOLUONGSI = EmptyValues.v_decimal;
         _SOLUONGLE = EmptyValues.v_decimal;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["MAKHO"] is DBNull))
		{
			obj.MAKHO = (Guid)reader["MAKHO"];
		}
                if(!(reader["MAMATHANG"] is DBNull))
		{
			obj.MAMATHANG = (Int32)reader["MAMATHANG"];
		}
                if(!(reader["SOLUONGSI"] is DBNull))
		{
			obj.SOLUONGSI = (decimal)reader["SOLUONGSI"];
		}
                if(!(reader["SOLUONGLE"] is DBNull))
		{
			obj.SOLUONGLE = (decimal)reader["SOLUONGLE"];
		}
//            _MAKHO = (reader["MAKHO"] is DBNull)?DalTools.EmptyValues.v_Guid:(Guid)reader["MAKHO"];
//            _MAMATHANG = (reader["MAMATHANG"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["MAMATHANG"];
//            _SOLUONGSI = (reader["SOLUONGSI"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["SOLUONGSI"];
//            _SOLUONGLE = (reader["SOLUONGLE"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["SOLUONGLE"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(Guid MAKHO, Int32 MAMATHANG, decimal SOLUONGSI, decimal SOLUONGLE)
        {
                     this._MAKHO = MAKHO;
         this._MAMATHANG = MAMATHANG;
         this._SOLUONGSI = SOLUONGSI;
         this._SOLUONGLE = SOLUONGLE;
        }
    }
}